﻿using AiQiuQuan.Sport.Model.Enums;

namespace AiQiuQuan.Sport.Model.Models
{
    /// <summary>
    /// 支付信息
    /// </summary>
    public class PayInfoDto
    {
        /// <summary>
        /// ctor
        /// </summary>
        public PayInfoDto()
        {
            VenueMemberCardList = new List<VenueUserCardPayDto>();
            OrderInfo = new OrderInfo();
            PayTypeList = new List<NameValue<string, int>>
            {
                new NameValue<string, int>
                {
                    Name = PayTypeEnum.WXPay.ToEnumDescription(),
                    Value = (int)PayTypeEnum.WXPay
                }
            };
        }

        /// <summary>
        /// 当前用户ID
        /// </summary>
        public Guid? UserId { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        public BusinessTypeEnum BusinessType { get; set; }

        /// <summary>
        /// 业务订单ID
        /// </summary>
        public OrderInfo OrderInfo { get; set; }

        /// <summary>
        /// 场馆会员卡信息
        /// </summary>
        public List<VenueUserCardPayDto> VenueMemberCardList { get; set; }

        /// <summary>
        /// 支付方式列表
        /// </summary>
        public List<NameValue<string, int>> PayTypeList { get; set; }
    }

    /// <summary>
    /// 订单基础信息
    /// </summary>
    public class OrderInfo
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public Guid OrderId { get; set; }

        /// <summary>
        /// 商品名
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 商品描述备注
        /// </summary>
        public string ProductDescription { get; set; }

        /// <summary>
        /// 订单总金额
        /// </summary>
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 订单对应的次数（针对场馆订单）
        /// </summary>
        public decimal TimesCount { get; set; }
    }
}
